package niuke;
/*
父类new直接执行构造方法
        子类new，先执行父类的构造方法，再执行自己的构造方法*/
public class ttt { public static void main(String[] args) {
    Father a = new Father();
//    Father b = new Child();
}
}
class Father {
    public Father() {
        System.out.println("我是父类");
    }
}
//class Child extends Father { public Child() {
//    System.out.println("我是子类");
//}
